package com.chinasofti.mydate;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDemo04 {
    public static void main(String[] args) throws ParseException {
        String s = "2049-01-01";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date date = sdf.parse(s);
        System.out.println("date="+date);

    }
}
